import {legacy_createStore,applyMiddleware} from 'redux'
import thunk from 'redux-thunk'
import logger from 'redux-logger'
const initialState = {
  list:[]
}

const reducer= (state = initialState, { type, payload }:any) => {
  switch (type) {

  case 'get':
    state.list=payload
    return { ...state }

  default:
    return state
  }
}
const store=legacy_createStore(reducer,applyMiddleware(logger,thunk))
export default store